package com.zxl.yjb.adapter;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.zxl.yjb.GlideApp;
import com.zxl.yjb.R;
import com.zxl.yjb.bean.UserBean;

public class MyCouponAdapter extends BaseQuickAdapter<UserBean, BaseViewHolder> {

    public MyCouponAdapter(int layoutResId) {
        super(layoutResId, null);
    }

    @Override
    protected void convert(BaseViewHolder holder, UserBean item) {
//        helper.setText(R.id.tv_user_name, item.userName);
//        helper.setText(R.id.tv_comment_content, item.content);
//        RatingBar rbStart = helper.getView(R.id.rb_star);
//        rbStart.setRating(item.star);
        holder.itemView.setTag(item.getId());
        holder.setText(R.id.tv_user_name,item.getNickname())
                .setText(R.id.tv_gender,item.getSex()==1?"男":"女");
//                .setText(R.id.tv_age,item.ge());
        GlideApp.with(mContext).load(item.getFace_img()).into((ImageView) holder.getView(R.id.iv_user_header));

    }


}
